import request from '../../request.js';
import {
	register,
	sendMsg,
	phoneLogon,
	nameLogon,
	getUserById,
	getrisk,
	getresult,
	userUpdate,
	getUserWallet,
	userCashIn,
	userCashOut
} from "../../urls.js"

export default {
	// 发送验证码
	sendMsg(data){
		return request({
			url:sendMsg ,
			method:'GET',
			data
		})
	},
	// 注册
	register(data) {
		return request({
			url: register,
			method: 'POST',
			data
		})
	},
	// 手机号登陆
	phoneLogon(data){
		return request({
			url:phoneLogon,
			method:'POST',
			data
		})
	},
	// 账号密码登陆
	nameLogon(data){
		// console.log(data);
		return request({
			url:nameLogon,
			method:'POST',
			data
		})
	},
	// 根据用户id查询
	getUserById(data){
		// console.log(data);
		return request({
			url:getUserById,
			method:'GET',
			data
		})
	},
	//风险评测
	getrisk(data){
		return request({
			url:getrisk,
			method:'POST',
			data
		})
	},
	// 修改用户信息
	userUpdate(data){
		return request({
			url:userUpdate,
			method:'POST',
			data
		})
	},
	
	//信息认证
	getresult(data){
		return request({
			url:getresult,
			method:'POST',
			data
		})
	},
	// 获取用户资产
	getUserWallet(data){
		return request({
			url:getUserWallet,
			method:'GET',
			data
		})
	},
	// 用户钱包充值
	userCashIn(data){
		return request({
			url:userCashIn,
			method:'POST',
			data
		})
	},
	// 提现
	userCashOut(data){
		return request({
			url:userCashOut,
			method:'POST',
			data
		})
	}

}

